import Vue from 'vue'
import App from './App.vue'
import router from './router'
import VueRouter from 'vue-router';
import store from './store'

import ElementUI from 'element-ui';
import './permission'
import 'element-ui/lib/theme-chalk/index.css';
import 'normalize.css/normalize.css'

// import VueWebsocket from "vue-websocket";

/*Vue.use(VueWebsocket, "ws://192.168.1.109:9999/bro/chenjain/test", {
    reconnection: true
});*/

const routerPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
    return routerPush.call(this, location).catch(error => error)
}

Vue.use(ElementUI);

Vue.config.productionTip = false;

Vue.prototype.$baseUrl = '/api';

new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
});
